/*
Navicat MySQL Data Transfer

Source Server         : Mysql
Source Server Version : 50553
Source Host           : localhost:3306
Source Database       : jsxt

Target Server Type    : MYSQL
Target Server Version : 50553
File Encoding         : 65001

Date: 2017-06-29 08:54:24
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `admins`
-- ----------------------------
DROP TABLE IF EXISTS `admins`;
CREATE TABLE `admins` (
`id`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`name`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`password`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci

;

-- ----------------------------
-- Records of admins
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `appointment`
-- ----------------------------
DROP TABLE IF EXISTS `appointment`;
CREATE TABLE `appointment` (
`booking_id`  int(11) NOT NULL AUTO_INCREMENT ,
`callno`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`ID`  char(18) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
PRIMARY KEY (`booking_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=1

;

-- ----------------------------
-- Records of appointment
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `books`
-- ----------------------------
DROP TABLE IF EXISTS `books`;
CREATE TABLE `books` (
`ISBN`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`language`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`book_name`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`author`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`publish`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`summary`  text CHARACTER SET utf8 COLLATE utf8_general_ci NULL ,
`tag`  varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`in_time`  date NOT NULL ,
`lend_time`  date NULL DEFAULT NULL ,
`deadline`  date NULL DEFAULT NULL ,
`borrower`  char(18) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`status`  int(11) NOT NULL ,
`callno`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`type`  varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
PRIMARY KEY (`ISBN`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci

;

-- ----------------------------
-- Records of books
-- ----------------------------
BEGIN;
INSERT INTO `books` VALUES ('	978-7-5342-2645-8', 'chi', '冒险小虎队．魔爪', '(奥)托马斯·布热齐纳(Thomas Brezina)', ' 浙江少年儿童出版社', null, '	侦探小说,	儿童文学', '2017-06-29', null, null, null, '0', 'I521/65/19', '小说'), ('978-7-5448-2304-3', 'chi', '鸡皮疙瘩·灵偶主题馆', '(美) 斯坦 (Stine,R.L.) ', ' 接力出版社', '本书由“鸡皮疙瘩经典系列”中的《灵偶》、《灵偶Ⅱ》、《灵偶Ⅲ》、《诡异魔术兔》四个故事组合而成。', '	儿童文学,长篇小说', '2017-06-28', null, null, null, '0', 'J951.1/BD/84', '小说');
COMMIT;

-- ----------------------------
-- Table structure for `borrow_history`
-- ----------------------------
DROP TABLE IF EXISTS `borrow_history`;
CREATE TABLE `borrow_history` (
`history_id`  int(11) NOT NULL ,
`ISBN`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`ID`  char(18) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
PRIMARY KEY (`history_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci

;

-- ----------------------------
-- Records of borrow_history
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id`  char(18) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`name`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`password`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`phonenumber`  char(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci

;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES ('440112199511080018', 'ZhangSan', '123456', '13168392998'), ('440121199811680364', 'Lisi', '123456', '13589754681');
COMMIT;

-- ----------------------------
-- Auto increment value for `appointment`
-- ----------------------------
ALTER TABLE `appointment` AUTO_INCREMENT=1;
